package com.cskaoyan.controller.wx;


import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.market.*;
import com.cskaoyan.bean.wxcategory.CategoryIndexVO;
import com.cskaoyan.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 商场管理模块 商品类目单元
 * 赵维虎
 */
@RestController
@RequestMapping("wx/catalog")
public class WXCategoryController {

    @Autowired
    CategoryService categoryService;

    @RequestMapping("index")
    public BaseRespVo index(){
        CategoryIndexVO categoryIndexVO = categoryService.index();
        return BaseRespVo.ok(categoryIndexVO);
    }

    @RequestMapping("current")
    public BaseRespVo current(int id){
        CategoryIndexVO categoryIndexVO = categoryService.current(id);
        return BaseRespVo.ok(categoryIndexVO);
    }

}
